﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using Steve.UI.Administration.Resources;

namespace Steve.UI.Administration.Models
{
    public sealed class NewSiteDetailModel
    {
        [Required]
        [RegularExpression(RegexPatterns.UrlAuthority)]
        [DataType("Url-Authority")]
        [StringLength(80)] //approx max with domain name and port
        //[Description("Authority of the site (domain and port)")]
        [Display(ResourceType = typeof(CommonResources), Name = "Site_Authority_Name", Description = "Site_Authority_Description", GroupName = "Basic_GroupName")]
        public string Authority { get; set; }
        
        //[DisplayName("Name")]
        //[Description("Unique identifier of the site")]
        [Required]
        [RegularExpression(RegexPatterns.SiteName)]
        [StringLength(50)]
        [Display(ResourceType = typeof(CommonResources), Name = "Site_SiteName_Name", Description = "Site_SiteName_Description", GroupName = "Basic_GroupName")]
        public string SiteName { get; set; }

        [Display(ResourceType = typeof(CommonResources), Name = "Site_AlternateAuthorities_Name", Description = "Site_AlternateAuthorities_Description", GroupName = "Site_AlternateAuthorities_GroupName")]
        public IEnumerable<string> AlternateAuthorities { get; set; }
        
        //[DisplayName("Has SteveSiteModule")]
        //[Description("Indicates whether this site is managed by the Steve runtime or not.")]
        [Display(ResourceType = typeof(CommonResources), Name = "Site_IsManagedSite_Name", Description = "Site_IsManagedSite_Description", GroupName = "Basic_GroupName")]
        public bool IsManagedSite { get; set; }
    }
}
